From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj@www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:21:49 2006 Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0001.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj@www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0001.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:09 2006 Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj@www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0002.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj@www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj@www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0002.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:08 2006 Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0003.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0003.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0004.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0004.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0005.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0005.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0006.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0006.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0007.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0007.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0008.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0008.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0009.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0009.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0010.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0010.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0011.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0011.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0012.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0012.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0013.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0013.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0014.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0014.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0015.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0015.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0016.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0016.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0017.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0017.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0018.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0018.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0019.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0019.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0020.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0020.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0021.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0021.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0022.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0022.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0023.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0023.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0024.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0024.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0025.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0025.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0026.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0026.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0027.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0027.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0028.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0028.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0029.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0029.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0030.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0030.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0031.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0031.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0032.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0032.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0033.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0033.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0034.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0034.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0035.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0035.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0036.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0036.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0037.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0037.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0038.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0038.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0039.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0039.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0040.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0040.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0041.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0041.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0042.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0042.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0043.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0043.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0044.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0044.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0045.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0045.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0046.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0046.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0047.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0047.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0048.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0048.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0049.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0049.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0050.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0050.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0051.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0051.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0052.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0052.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0053.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0053.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0054.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0054.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0055.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0055.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0056.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0056.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0057.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0057.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0058.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0058.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0059.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0059.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0060.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0060.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0061.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0061.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0062.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0062.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0063.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0063.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0064.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0064.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0065.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0065.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0066.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0066.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0067.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0067.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0068.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0068.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0069.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0069.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0070.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0070.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0071.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0071.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0072.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0072.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0073.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0073.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0074.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0074.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0075.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0075.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0076.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0076.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0077.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0077.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0078.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0078.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0079.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0079.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0080.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0080.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0081.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0081.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0082.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0082.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0083.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0083.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0084.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0084.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0085.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0085.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0086.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0086.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0087.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0087.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0088.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0088.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0089.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0089.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0090.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0090.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0091.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0091.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0092.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0092.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0093.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0093.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0094.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0094.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0095.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0095.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0096.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0096.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0097.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0097.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0098.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0098.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0099.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0099.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0100.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0100.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0101.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0101.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0102.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0102.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0103.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0103.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0104.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0104.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0105.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0105.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0106.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0106.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0107.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0107.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0108.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0108.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0109.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0109.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0110.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0110.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0111.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0111.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0112.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0112.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0113.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0113.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0114.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0114.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0115.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0115.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0116.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0116.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0117.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0117.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0118.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0118.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0119.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0119.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0120.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0120.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0121.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0121.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0122.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0122.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0123.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0123.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0124.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0124.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0125.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0125.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0126.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0126.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0127.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0127.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0128.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0128.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0129.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0129.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0130.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0130.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0131.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0131.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0132.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0132.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0133.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0133.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0134.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0134.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0135.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0135.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0136.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0136.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0137.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0137.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0138.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0138.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0139.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0139.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0140.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0140.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0141.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0141.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0142.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0142.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0143.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0143.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0144.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0144.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0145.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0145.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0146.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0146.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0147.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0147.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0148.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0148.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0149.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0149.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0150.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0150.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0151.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0151.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0152.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0152.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0153.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0153.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0154.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0154.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0155.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0155.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0156.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0156.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0157.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0157.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0158.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0158.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0159.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0159.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0160.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0160.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0161.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0161.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0162.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0162.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0163.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0163.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0164.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0164.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0165.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0165.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0166.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0166.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0167.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0167.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0168.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0168.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0169.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0169.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0170.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0170.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0171.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0171.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0172.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0172.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0173.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0173.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0174.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0174.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0175.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0175.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0176.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0176.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0177.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0177.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0178.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0178.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0179.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0179.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0180.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0180.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0181.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0181.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0182.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0182.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0183.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0183.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0184.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0184.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0185.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0185.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0186.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0186.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0187.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0187.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0188.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0188.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0189.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0189.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0190.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0190.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0191.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0191.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0192.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0192.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0193.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0193.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0194.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0194.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0195.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0195.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0196.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0196.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0197.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0197.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0198.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0198.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0199.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0199.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0200.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0200.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0201.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0201.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0202.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0202.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0203.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0203.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0204.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0204.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0205.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0205.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0206.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0206.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0207.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0207.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0208.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0208.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0209.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0209.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0210.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0210.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0211.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0211.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0212.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0212.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0213.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0213.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0214.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0214.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0215.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0215.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0216.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0216.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0217.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0217.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0218.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0218.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0219.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0219.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0220.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0220.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0221.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0221.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0222.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0222.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0223.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0223.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0224.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0224.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0225.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0225.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0226.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0226.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0227.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0227.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0228.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0228.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0229.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0229.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0230.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0230.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0231.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0231.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0232.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0232.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0233.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0233.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0234.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0234.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0235.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0235.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0236.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0236.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0237.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0237.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0238.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0238.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0239.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0239.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0240.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0240.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0241.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0241.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0242.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0242.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0243.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0243.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0244.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0244.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0245.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0245.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0246.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0246.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0247.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0247.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0248.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0248.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0249.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0249.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0250.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0250.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0251.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0251.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0252.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0252.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0253.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0253.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0254.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0254.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0255.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0255.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0256.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0256.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0257.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0257.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0258.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0258.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0259.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0259.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0260.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0260.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0261.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0261.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0262.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0262.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0263.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0263.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0264.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0264.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0265.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0265.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0266.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0266.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0267.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0267.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0268.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0268.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0269.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0269.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0270.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0270.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0271.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0271.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0272.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0272.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0273.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0273.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0274.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0274.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0275.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0275.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0276.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0276.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0277.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0277.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0278.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0278.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0279.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0279.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0280.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0280.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0281.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0281.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0282.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0282.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0283.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0283.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0284.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0284.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0285.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0285.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0286.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0286.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0287.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0287.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0288.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0288.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0289.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0289.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0290.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0290.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0291.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0291.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0292.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0292.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0293.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0293.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0294.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0294.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0295.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0295.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0296.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0296.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0297.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0297.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0298.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0298.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0299.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0299.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0300.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0300.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0301.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0301.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0302.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0302.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0303.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0303.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0304.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0304.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0305.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0305.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0306.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0306.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0307.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0307.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0308.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0308.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0309.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0309.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0310.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0310.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0311.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0311.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0312.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0312.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0313.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0313.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0314.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0314.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0315.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0315.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0316.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0316.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0317.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0317.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0318.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0318.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0319.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0319.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0320.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0320.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0321.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0321.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0322.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0322.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0323.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0323.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0324.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0324.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0325.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0325.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0326.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0326.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0327.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0327.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0328.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0328.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0329.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0329.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0330.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0330.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0331.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0331.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0332.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0332.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0333.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0333.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0334.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0334.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0335.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0335.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0336.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0336.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0337.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0337.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0338.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0338.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0339.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0339.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0340.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0340.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0341.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0341.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0342.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0342.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0343.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0343.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0344.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0344.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0345.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0345.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0346.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0346.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0347.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0347.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0348.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0348.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0349.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0349.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0350.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0350.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of the versions is in order. Mar 10, 1997 - Mar 17, 1998 rxtx-0.1->rxtx1.1.5 came out. The releases predate CommAPI. These are fairly simple packages that can read and write. Solaris, Linux and w32 support formed in the later versions. Earlier versions worked with the 1.02 JNI which is no longer used. While rxtx tries to support CommAPI, it should be clear from these releases that was not the inital purpose. May 19, 1998 - Mar 26, 2000 rxtx-1.2->rxtx-1.3-13 came out. These release form the "JCL" or java comm linux releases. Focus was making rxtx work with Sun's CommAPI and adding ports for HP-UX, AIX, FreeBSD. Many details like timing, timeouts, adding missing features happened. Jun 6, 2000 - Dec 4, 2001 1.4-1->1.4-15 and 1.5-1->1.5-8 rxtx splits into two trees. RXTX 1.4 continues the JCL development. The 1.4 Sun CommAPI + rxtx is primarily developed while pieces of the complete API are filled in 1.5. During this process it comes to our attention that the Sun License protects the javax.comm namespace. rxtx 1.5 is placed into the gnu.io namespace until Sun makes it clear that rxtx may use that namespace. With this change, rxtx 1.5 becomes a Debian package. Apr 5, 2002 - current 2.0-1->current and 2.1.1->current The split tree continues. rxtx 2.0 is still following the JCL like 1.4. rxtx 2.1 is a complete package now and begins extensive testing with third parties. Attempts are made to keep rxtx 2.0 in sync with rxtx 2.1. Their native code functionally identical but they do live in seperate packages. The releases happen as follows: 2.1-1preX [missing?] 2.1-1preX+1 2.0-1pre1 (sync) 2.1-1 2.0-1 (sync) 2.1-2preX [missing?] 2.1-2 2.0-2 (sync) We currently have sync'd versions of both trees. The current releases are: 2.1-7pre17 rxtx-2.0-7pre1 (sync) The code should be good. There are known issues outlined on the front page of rxtx.org. 2.1-7 and 2.0-7 will be released when the known problems are resolved and rxtx 2.1 passes through another series of third party tests. So the pre releases have not passed QA on sparc Sol,W32, and x86 Linux (The only platforms we can test because of the nature of the tests). We missed releasing rxtx 2.0-6. IE we did not sync the 2.1-6 release with 2.0. With more time, I would have done that sync too. The 2.0-7pre1 should be good though. As mentioned, we do not have QA for JCL (2.0). The same native code is tested in 2.1 though. So most activity happens in 2.1. A concious effort is made to keep 2.0 current when it counts. So that is the Source release history. Binaries have been very problematic in the past. What I have done here to try to help resolve the problem in the future is prepare some cross compilers so we can release binaries for many systems with every future release. The compilers I currently have cover the following: x86 FreeBSD x86 Linux x86_64 Linux ARM Linux x86 w32 (mingw32) w9X,ME,NT,XP,2K... Sparc Solaris Dimitry has full run of the tree and keeps the MacOSX binaries in the Source distribution. Some platforms require licenses for libraries we probably wont obtain. With valid licenses, libraries and headers, its possible to build binaries for almost any platform. For those platforms we can not build for, we will have to depend upon others to contribute binaries for major releases. The cross compilers along with a discussion going on currently concerning easier installs should help end users significantly. -- Trent Jarvi taj at www.linux.org.uk From minyal at nortelnetworks.com Fri Feb 27 15:11:01 2004 From: minyal at nortelnetworks.com (Minya Liang) Date: Fri, 27 Feb 2004 16:11:01 -0600 Subject: [Rxtx] RXTX proper exception when port is gone Message-ID: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Hi, I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is a virtual one. The device could go to sleep after a while and so the virtual COM port would be gone. If an application still has the port open when it's gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this happens. When inputstream.available() (or maybe any IO op involving reading the stream, as commonly found in handlers for this event type) is called, I get the following error: Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is not functioning. Error 0x1f at /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device attached to the system is Then the Java exception thrown is: java.io.IOException: No error in nativeavailable at gnu.io.RXTXPort.nativeavailable(Native Method) at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) at com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) My question is can the native code tell if the port is gone vs. some other IO error when the port is still around? If so, can this more specific error cause to presented in the IOException thrown so that application code could decide how or if to recover from it. Thanks, LMY -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040227/1ce598f2/attachment-0351.html From taj at www.linux.org.uk Fri Feb 27 15:29:27 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:29:27 +0000 (GMT) Subject: [Rxtx] RXTX proper exception when port is gone In-Reply-To: <870397D7C140C84DB081B88396458DAF048D24DF@zrc2c000.us.nortel.com> Message-ID: On Fri, 27 Feb 2004, Minya Liang wrote: > Hi, > I'm using RXTX v2.0.7-pre1 Win32 version for a USB device whose COM port is > a virtual one. The device could go to sleep after a while and so the virtual > COM port would be gone. If an application still has the port open when it's > gone, a "DATA_AVAILABLE" serialEvent would be triggered the moment this > happens. When inputstream.available() (or maybe any IO op involving reading > the stream, as commonly found in handlers for this event type) is called, I > get the following error: > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is not functioning. > > > Error 0x1f at > /var/ftp/pub/rxtx/rxtx-2.0-7pre1/buildw32/../src/termios.c(512): A device > attached to the system is > > Then the Java exception thrown is: > > java.io.IOException: No error in nativeavailable > at gnu.io.RXTXPort.nativeavailable(Native Method) > at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1519) > at > com.jdd.serial.SerialPortHandler.serialEvent(SerialPortHandler.java:198) > at gnu.io.RXTXPort.sendEvent(RXTXPort.java:759) > at gnu.io.RXTXPort.eventLoop(Native Method) > at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1558) > > My question is can the native code tell if the port is gone vs. some other > IO error when the port is still around? If so, can this more specific error > cause to presented in the IOException thrown so that application code could > decide how or if to recover from it. > > Thanks, > LMY > At or near line 512 in termios.c rxtx is recieving error 0x1f. That appears to be fairly unique to what you are experiencing. So it appears you can know when that IO error occurs after the virtual port goes away. There isnt any code in rxtx to help you with ports comming and going. The thought never came into the design. Everything in termios.c is aimed at making w32 behave like a POSIX system. You could manipulate the (negative) return values and evaluate them in SerialImp.c. SerialImp.c is where you would throw the new exception. There is little you would want to do in termios.c other than perhaps change return values. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Fri Feb 27 15:34:42 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java Message-ID: http://www.eweek.com/article2/0,4149,1539668,00.asp I'd just like to say I for one would like to work with any open source venture Sun and IBM may agree to. Sun licensing with respect to rxtx has resulted in two different versions which causes endless confusion for end users. I think Open Source Java would be a big win for the rxtx project. I would be in favor of merging rxtx code and talent with an open source venture. -- Trent Jarvi taj at www.linux.org.uk From rwelty at averillpark.net Fri Feb 27 15:50:45 2004 From: rwelty at averillpark.net (Richard Welty) Date: Fri, 27 Feb 2004 17:50:45 -0500 (EST) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: References: Message-ID: On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > http://www.eweek.com/article2/0,4149,1539668,00.asp > I'd just like to say I for one would like to work with any open source > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > resulted in two different versions which causes endless confusion for end > users. i'm going to withhold judgement until i see what sort of "open source" license the two companies agree to. on the positive side, IBM has backed the GPL; on the negative side, neither the sun public license nor the ibm public license are particularly open (whence Postfix, with the IBM licensing, is not the default MTA in anybody's Linux distribution, unlike sendmail (BSD license) and exim (GPL) which have acheived that status.) richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at www.linux.org.uk Fri Feb 27 16:09:50 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri, 27 Feb 2004 23:09:50 +0000 (GMT) Subject: [Rxtx] Sun talking to IBM about Open Source Java In-Reply-To: Message-ID: On Fri, 27 Feb 2004, Richard Welty wrote: > On Fri, 27 Feb 2004 22:34:42 +0000 (GMT) Trent Jarvi wrote: > > > > http://www.eweek.com/article2/0,4149,1539668,00.asp > > > I'd just like to say I for one would like to work with any open source > > venture Sun and IBM may agree to. Sun licensing with respect to rxtx has > > resulted in two different versions which causes endless confusion for end > > users. > > i'm going to withhold judgement until i see what sort of "open source" > license the two companies agree to. on the positive side, IBM has > backed the GPL; on the negative side, neither the sun public license > nor the ibm public license are particularly open (whence Postfix, with > the IBM licensing, is not the default MTA in anybody's Linux distribution, > unlike sendmail (BSD license) and exim (GPL) which have acheived > that status.) > While not part of GNU, rxtx has had dozens of contributers that trusted the LGPL licensing of rxtx. The rxtx license will not change other than in cases like the HP clause rxtx 2.0 currently has which was a GNU suggestion. In such cases, we ask for public comment on the mail-list so everyone can have a chance to raise objections. It would not really be possible to significantly alter the intent. I'll leave it to better folks to figure out which licenses can work together. We will continue with the original intent. That said, I would like to work towards an Open Source Java. I would also like to see Sun change its licensing enough so that rxtx clearly could put rxtx 2.1 in the javax.comm namespace. I'm glad to see a dialog is starting. -- Trent Jarvi taj at www.linux.org.uk From achu at cypressasia.com Fri Feb 27 21:22:44 2004 From: achu at cypressasia.com (Adrian Chu) Date: Sat, 28 Feb 2004 12:22:44 +0800 Subject: [Rxtx] about non-blicking io Message-ID: <001801c3fdb2$85fea510$0d01a8c0@adrian> Dear Trent, Is there a way to use non-blocking IO with your RXTX? Best Regards, Adrian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20040228/5560fe65/attachment-0351.html From taj at www.linux.org.uk Sat Feb 28 09:09:16 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sat, 28 Feb 2004 16:09:16 +0000 (GMT) Subject: [Rxtx] about non-blicking io In-Reply-To: <001801c3fdb2$85fea510$0d01a8c0@adrian> Message-ID: On Sat, 28 Feb 2004, Adrian Chu wrote: > Dear Trent, > > Is there a way to use non-blocking IO with your RXTX? > > Best Regards, > Adrian Hi andrian I think you want to look at the timeout and threshold settings. They should do what you want. But maybe you are looking for something more? -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Mon Feb 23 13:51:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 23 Feb 2004 20:51:28 +0000 (GMT) Subject: [Rxtx] Windows Problem with RXTXBundle In-Reply-To: <822D02AD-63C6-11D8-A9D3-000A95DA5E9C@mac.com> Message-ID: Was this the last of the thread? I consider this important. Dmitry: Would you like to take over on this? You appear to have worked through this in thought further than I have and obviously are not afraid to contribute. So what is it? Do I push things along or do we have something close to a patch already? I'm very attracted to this becuase it does not 'break' anything I've tested. It just makes things easier for end users. On Fri, 20 Feb 2004, Dmitry Markman wrote: > > On Feb 20, 2004, at 11:25 AM, Moritz Gmelin wrote: > > > Well, there's plenty of candidates in OS X, plenty in Windows, plenty > > in Linux...... > > > > Most users will not have write access to all of them, so you would > > have to check on that. > > > > > > that's not true > > all user's folder based place don't have such a restriction (unless > remote user's folder special cases) > > we work with such technique many months already and don't have any > permissions problem > (linux, windows and Mac OS X) > > I'd suggest to replace direct call of loadLibrary > in static initializers of > CommPortIdentifier (rxtxSerial) > > I2C (rxtxI2C) > > LPRPort (rxtxParallel) > > Raw (rxtxRaw) > > RS485 (rxtxRS485) > > RXTXCommDriver (rxtxSerial) > > > to something like that (we can use Moritz LibLoader class) > > public static boolean loadNativeLibrary(String libName){ > boolean libOK = false; > try{ > System.loadLibrary( libName ); > libOK = true; > }catch(Throwable t){ > } > if(!libOK){ > libOK = installNativeLibrary(libName); > } > return libOK; > } > > static boolean installNativeLibrary(String libName){ > //here we can provide code for the installation native library > //it could be temporary folder or I think it's better permanent folder > > .... > > > boolean libOK = false; > try{ > System.load( pathToLibrary ); > libOK = true; > }catch(Throwable t){ > } > return libOK; > > } > > I'd put native library into the following path (inside of the RXTX.jar) > file > > gnu.io.native.linux.i386.serial.librxtxSerial.so > gnu.io.native.linux.i386.i2c. > gnu.io.native.linux.i386.lpr. > gnu.io.native.linux.i386.raw. > gnu.io.native.linux.i386.rs485. > > gnu.io.native.linux.ppc.serial.librxtxSerial.so > gnu.io.native.linux.ppc.i2c. > gnu.io.native.linux.ppc.lpr. > gnu.io.native.linux.ppc.raw. > gnu.io.native.linux.ppc.rs485. > > gnu.io.native.macosx.serial.librxtxSerial.jnilib > > gnu.io.native.windows.serial.rxtxSerial.dll > gnu.io.native. windows.i2c. > gnu.io.native. windows.lpr. > gnu.io.native. windows.raw. > gnu.io.native. windows.rs485. > > so we have to provide very simple script to add library to jar file > after library building > > > > > > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org:8080/mailman/listinfo/rxtx > -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Tue Feb 24 10:51:45 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 24 Feb 2004 17:51:45 +0000 (GMT) Subject: [Rxtx] RXTX version questions answered. Message-ID: Some clarification of rxtx versions has been requested. Perhaps a short history of